package com.example.androidcoursedesign2012.controller;

import com.example.androidcoursedesign2012.bean.User;
import com.example.androidcoursedesign2012.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//用户控制类
@RestController
public class UserController {
    UserService userService;
    @GetMapping("/userList")
    public List<User>getUserList(){
        List<User> userList=userService.getUserList();
        return userList;
    }

    @GetMapping("/userListXML")
    public List<User>getUserListXML(){
        List<User> userList=userService.getUserList();
        return userList;
    }
}
